import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, ManyToOne } from 'typeorm';
import { User } from './User';

@Entity('study_goals')
export class StudyGoal {
  @PrimaryGeneratedColumn()
  id: number;

  @ManyToOne(() => User, user => user.studyGoals)
  user: User;

  @Column()
  targetWordCount: number;

  @Column()
  targetCategoryCount: number;

  @Column({ type: 'date' })
  targetDate: Date;

  @Column({ default: false })
  isCompleted: boolean;

  @Column({ default: 0 })
  currentProgress: number;

  @CreateDateColumn()
  createdAt: Date;

  @UpdateDateColumn()
  updatedAt: Date;
} 